﻿#pragma once

#include <functional>

// CSetting 对话框

class CSetting : public CDialogEx
{
	DECLARE_DYNAMIC(CSetting)

public:
	CSetting(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CSetting();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DIALOG1 };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();

	void SetCallback(const std::function<void()>& fn) { m_fnCallback = fn; }

private:
	std::function<void()> m_fnCallback;

public:
	afx_msg void OnBnClickedOk();
	afx_msg void OnHotKey(UINT nHotKeyId, UINT nKey1, UINT nKey2);
	afx_msg void OnBnClickedRadioRed();
	afx_msg void OnBnClickedRadioBlack();
	afx_msg void OnBnClickedRadioRubber();
private:
	void SetAllRadioCheck(int n);
public:
	afx_msg void OnBnClickedButtonClear();
	CButton m_radioRect;
	CButton m_radioCircle;
	CButton m_radioRed;
	CButton m_radioBlack;
	CButton m_radioRubber;
	afx_msg void OnBnClickedRadioRect();
	afx_msg void OnBnClickedRadioCircle();
	afx_msg void OnBnClickedRadioDrag();
	CButton m_radioDrag;
	CButton m_radioEllipse;
	afx_msg void OnBnClickedRadioEllipse();
};
